Base solution for your next web application

Activities of "hans abelshausen"

Hi! I logged in and returned to destination page. Is there a way to get the logged in user in my javascript code and hide some buttons if user is not in role to see this buttons?

Sorry, I think I misspelled my question. I only want to Show the username of the logged in user at the top of my application. And my question is is there an abp.user or something else so that I get the Name of the logged in user. In abp.session there is the id of the user and I can get the username from db, but I thought the username is saved somewhere after logging in

Question

Hi, I have implemented Module Zero and everything works fine. Now I try to implement the Login later. What is the best way to do this? A normal user(Not logged in) can view the page and some buttons on top of the page! If the user clicks Button login, the Login Form should appear and after login the edit Buttons should also be visible! Thanks in advance Hans

Question

Hi, could you please explain the abp setting table. I have filled the db table with content. Is it necessary to add these content in application settingprovider what I have done. If I started my app a few times and then try to add another setting in the db, the ID increments but not to the next number instead of for example from 3 to 10. I don't know why or haven't understood the settingmanager :-( Here in my application layer:

public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
        {
            return new[]
                   {
                       new SettingDefinition(
                           "FunctionShowShortField", 
                           "true",
                           scopes: SettingScopes.Application, 
                           isVisibleToClients: true),
                        new SettingDefinition(
                           "ProcEditOnlyDraft", 
                           "true",
                           scopes: SettingScopes.Application, 
                           isVisibleToClients: true)
                   };
        }

I wolud like to handle the values of the db table in my angular controller. (abp.setting.get("FunctionShowShortField"))

Question

Hi, I'm trying to delete a table entry in db with foreign key properties to another table. Correctly, the enty is not deleted. My question, after going back to my javascript code: .error(function (response) { abp.message.error('Error Message', 'Is not deleted'); })

following popup appears in my browser. That is perfect. But before this popup appears, another popup is shown, which is not very userfriendly...Something like: An error occured while updating the entries. See the inner exception for details.... STACK TRACE: System.Data.Entity... and so on..

How can I turn off this message and only show up the abp.message.error?

Hi, I have updated abp to newest version and now my dictionary provider is not working anymore... The function GetDictionaries is not there anymore and LocalizationDictionaryInfo has less params...Could you please show me the correct code?

public IEnumerable<LocalizationDictionaryInfo> GetDictionaries(string sourceName)
        {

            var cultures = _cultureService.GetOnlyLanguages().GlobalLanguages.ToList();
            var entries = _labelTextService.GetTranslationTexts().TranslationTexts.ToList();

            var dictionaries = new List<LocalizationDictionaryInfo>();

            foreach (var culture in cultures)
            {
                var tempInfo = new CultureInfo(culture.IsoCode);
                dictionaries.Add(new LocalizationDictionaryInfo(DbLocalizationDictionary.Build(tempInfo, entries),
                    isDefault: Convert.ToBoolean(culture.DefaultLang)));
            }
            return dictionaries;

        }

I have tried following code and the dictionaries are loaded. But if I change language in my menu, the localization do not swtich to the selected lang? [code][/public void Initialize(string sourceName) { var cultures = _cultureService.GetOnlyLanguages().GlobalLanguages.ToList(); var entries = _labelTextService.GetTranslationTexts().TranslationTexts.ToList();

        foreach (var culture in cultures)
        {
            var tempInfo = new CultureInfo(culture.IsoCode);
            if(Dictionaries == null)
                Dictionaries = new Dictionary&lt;string, ILocalizationDictionary&gt;();
            Dictionaries.Add(tempInfo.ToString(),DbLocalizationDictionary.Build(tempInfo, entries));
        }
    }code]

Hi, I have implemented a custom db localizationsource which was described here a few month ago. I'm using your Language Menu on top of the page! The currentlanguagemenu object is changing but abp.localization.values is not changing values to my selected language anymore. I think everything is correctly filled. Here is my code of my own dictionary provider:

public IDictionary<string, ILocalizationDictionary> Dictionaries { get; set; }
        public void Initialize(string sourceName)
        {
            var cultures = _cultureService.GetOnlyLanguages().GlobalLanguages.ToList();
            var entries = _labelTextService.GetTranslationTexts().TranslationTexts.ToList();
            
            foreach (var culture in cultures)
            {
                var tempInfo = new CultureInfo(culture.IsoCode);
                if(Dictionaries == null)
                    Dictionaries = new Dictionary<string, ILocalizationDictionary>();
                Dictionaries.Add(tempInfo.ToString(),DbLocalizationDictionary.Build(tempInfo, entries));
            }
        }

Seems to me, that <a href="~/AbpLocalization/ChangeCulture?cultureName={{language.name}}&returnUrl=@ApplicationPath">{{language.name}}</a> is not working anymore... Have you changed something?

Thanks in advance

Hi, we have similar problems. What is the right way to activate sso without getting thousands of redirects to login form? Thanks in advance

I'm using SSO like Klainer described. My problem is, if I try to login with SSO and if user not found, I'll try to login with username and password of the application. I get user from db, but in my controller abp.session.userId is undefined. If I log in directly after start of the application with username and password, userId is set.

Showing 21 to 30 of 37 entries